home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / windows / mrun211.zip / MRUN211C.WAS < prev    next >
Text File  |  1993-05-01  |  24KB  |  915 lines

  1. ;MailRun v2.11:  Part C, changebbs
  2. ;1992-1993 Gerald P. Sully, all rights reserved.
  3.  
  4. #comment
  5. **************************************************************************
  6. **************************************************************************
  7. * This file contains routines related to changing BBS settings.
  8. * Settings are divided into three groups, each with its own
  9. * dialog box:  BBS Settings, BBS Prompts, and Mail Door Prompts.
  10. * The appropriate routine is selected with a FLAG.
  11. **************************************************************************
  12. **************************************************************************
  13. #endcomment
  14.  
  15. #define MRUN211C
  16. #define MRUN211BC
  17.  
  18. #include "mrun211.h"
  19.  
  20. string ProtList, ArcList, MailDoorList, BBSTypeList, BBSChoice
  21.  
  22.  
  23. #comment
  24. *********************************************************************
  25. * MAIN()
  26. * Calls checkchild(), makemaildoorlist(), menudim(),
  27. * makebbstypelist(), makeprotlist(), changeprompts(),
  28. * changeuserinfo(), changemaildoor()
  29. * Dispatches the appropriate command based on the value
  30. * of FLAGS.
  31. *********************************************************************
  32. #endcomment
  33.  
  34. proc main
  35. integer cmdstatus
  36.     menudim()
  37.     checkchild()
  38.     findfirst MailRun
  39.     MailRunTrunc = $FILENAME
  40.     makeprotlist()
  41.     makebbstypelist()
  42.     makemaildoorlist()
  43.     cmdstatus = FLAGS & (USR + PRMPT + QMD)
  44.     switch cmdstatus
  45.         case USR
  46.             changeuserinfo()
  47.         endcase
  48.         case PRMPT
  49.             changeprompts()
  50.         endcase
  51.         case QMD
  52.             changemaildoor()
  53.         endcase
  54.     endswitch
  55. endproc
  56.  
  57.  
  58. #comment
  59. *********************************************************************
  60. * CHANGEUSERINFO()
  61. * Called by main()
  62. * Calls makebbslist(), loadbbsinfo(), loadprompts(), 
  63. * loadmaildoor(), writebbsinfo(), writeprompts(), 
  64. * writemaildoor(), interfaceon(), insertbbs(),
  65. * bbsbox(), addbbs(), defaultsprompts(), defaultsdoor(), 
  66. * cfgprompts(), cfgmaildoor(), checkchanged(),
  67. * gettaskstring()
  68. * Puts up the BBS Information dialog box and allows the
  69. * user to change the values for the current BBS.  If the
  70. * the DEFAULTS flag is set, changes the DEFAULT BBS
  71. * settings.  If the NEW flag is set, calls addbbs().
  72. *********************************************************************
  73. #endcomment
  74.  
  75. proc changeuserinfo
  76. string LastBBS, LastBBSType, BBSid, char
  77. integer dialogstatus, NameChanged, i
  78.     if FLAGS & DEFAULTS
  79.         BBSList = "DEFAULT"
  80.         BBSChoice = "DEFAULT"
  81.         loadbbsinfo(MailRun, "DEFAULT")
  82.         loadprompts(MailRunIni, BBSType)
  83.         loadmaildoor(MailRunIni, MailDoorType)
  84.         findfirst MailRun
  85.         strfmt BBSName "BBS Info Defaults for %s" $FILENAME
  86.     else
  87.         makebbslist()
  88.         strextract BBSChoice TaskItem "`t" 3
  89.         loadbbsinfo(MailRun, BBSChoice)
  90.         loadprompts(MailRun, BBSChoice)
  91.         loadmaildoor(MailRun, BBSChoice)
  92.     endif
  93.     NameChanged = 0
  94.     LastBBS = BBSChoice
  95.     LastBBSType = BBSType
  96.     bbsbox()
  97.     interfaceon()
  98.     FLAGS &= UNCHANGED
  99.     if FLAGS & NEW
  100.         addbbs()
  101.         LastBBS = BBSChoice
  102.     endif
  103.     while 1
  104.         dialogstatus = $DIALOG
  105.         switch dialogstatus
  106.             case 10
  107.                 ;User selected "Prompts"
  108.                 if FLAGS & DEFAULTS
  109.                     defaultsprompts()
  110.                 else
  111.                     cfgprompts()
  112.                 endif
  113.             endcase
  114.             case 11
  115.                 ;User selected "Mail Door"
  116.                 if FLAGS & DEFAULTS
  117.                     defaultsdoor()
  118.                 else
  119.                     cfgmaildoor()
  120.                 endif
  121.             endcase
  122.             case 12
  123.                 ;User selected "Save"
  124.                 if NULLSTR BBSName
  125.                     usermsg "You must enter the name of the BBS!"
  126.                     loopwhile
  127.                 elseif FLAGS & NEW
  128.                     ;if it is a new BBS
  129.                     if not NULLSTR TaskItem
  130.                         ;if there are other BBSs in the mailrun
  131.                         strextract BBSid TaskItem "`t" 3
  132.                         insertbbs(BBSid, BBSChoice)
  133.                     else
  134.                         ;if this is the only BBS in the mailrun
  135.                         writebbs(1, BBSChoice)
  136.                     endif
  137.                     TaskItem = gettaskstring(BBSid, 0)
  138.                     FLAGS &= OLD
  139.                 endif
  140.                 if FLAGS & DEFAULTS
  141.                     writebbsinfo(MailRun, "DEFAULT")
  142.                     writeprompts(MailRunIni, BBSType)
  143.                     writemaildoor(MailRunIni, MailDoorType)
  144.                 else
  145.                     writebbsinfo(MailRun, BBSChoice)
  146.                     writeprompts(MailRun, BBSChoice)
  147.                     writemaildoor(MailRun, BBSChoice)
  148.                 endif
  149.                 strextract char TaskItem "`t" 4
  150.                 atoi char i
  151.                 if NameChanged && !(i)
  152.                     TaskItem = gettaskstring(BBSChoice, 0)
  153.                 endif
  154.                 FLAGS &= UNCHANGED
  155.             endcase
  156.             case 13
  157.                 ;User selected "Done:
  158.                 if checkchanged()
  159.                     exit
  160.                 endif
  161.             endcase
  162.             case 171
  163.                 ;User changed the BBS type
  164.                 if FLAGS & DEFAULTS
  165.                     if checkchanged()
  166.                         loadprompts(MailRunIni, BBSType)
  167.                         FLAGS &= UNCHANGED
  168.                         LastBBSType = BBSType
  169.                     else
  170.                         BBSType = LastBBSType
  171.                     endif
  172.                 else
  173.                     loadprompts(MailRunIni, BBSType)
  174.                 endif
  175.                 FLAGS |= CHANGED
  176.                 updatedlg -1
  177.             endcase
  178.             case 172
  179.                 ;User changed the mail door type
  180.                 if FLAGS & DEFAULTS
  181.                     loadmaildoor(MailRunIni, MailDoorType)
  182.                 else
  183.                     loadmaildoor(MailRunIni, MailDoorType)
  184.                 endif
  185.                 FLAGS |= CHANGED
  186.             endcase
  187.             case 173
  188.                 ;User changed BBS ID with combobox
  189.                 if checkchanged()
  190.                     loadbbsinfo(MailRun, BBSChoice)
  191.                     loadprompts(MailRun, BBSChoice)
  192.                     loadmaildoor(MailRun, BBSChoice)
  193.                     TaskItem = gettaskstring(BBSChoice, 0)
  194.                     FLAGS &= UNCHANGED
  195.                     LastBBS = BBSChoice
  196.                     updatedlg -1
  197.                 else
  198.                     BBSChoice = LastBBS
  199.                     updatedlg 512
  200.                 endif
  201.             endcase
  202.             case 230
  203.                 NameChanged = 1
  204.                 FLAGS |= CHANGED
  205.             endcase
  206.             case 70
  207.             case 170
  208.             case 231
  209.             case 232
  210.             case 233
  211.             case 234
  212.             case 235
  213.             case 236
  214.             case 237
  215.             case 238
  216.             case 239
  217.                 FLAGS |= CHANGED
  218.             endcase
  219.         endswitch
  220.     endwhile
  221. endproc
  222.  
  223.  
  224. #comment
  225. *********************************************************************
  226. * CHANGEPROMPTS()
  227. * Called by main()
  228. * Calls makebbslist(), promptbox(), loadprompts(),
  229. * writeprompts(), interfaceon(), defaultsbbs(), defaultsdoor(),
  230. * cfgbbs(), cfgmaildoor(), exportprompts(), checkchanged(),
  231. * gettaskstring()
  232. * Allows the user to change the prompts for a given BBS in
  233. * the *.MRN file.  If DEFAULTS flag is set, changes default
  234. * prompts for the current BBS type.
  235. *********************************************************************
  236. #endcomment
  237.  
  238. proc changeprompts
  239. string LastBBS, LastBBSType
  240. integer dialogstatus
  241.     if FLAGS & DEFAULTS
  242.         BBSList = "DEFAULT"
  243.         BBSChoice = "DEFAULT"
  244.         profilerd MailRun "DEFAULT" "BBSType" BBSType
  245.         loadprompts(MailRunIni, BBSType)
  246.     else
  247.         makebbslist()
  248.         strextract BBSChoice TaskItem "`t" 3
  249.         profilerd MailRun BBSChoice "BBSType" BBSType
  250.         loadprompts(MailRun, BBSChoice)
  251.     endif
  252.     LastBBS = BBSChoice
  253.     LastBBSType = BBSType
  254.     promptbox()
  255.     FLAGS &= UNCHANGED
  256.     interfaceon()
  257.     while 1
  258.         dialogstatus = $DIALOG
  259.         switch dialogstatus
  260.             case 10
  261.                 ;User selected "BBS Info"
  262.                 if FLAGS & DEFAULTS
  263.                     defaultsbbs()
  264.                 else
  265.                     cfgbbs()
  266.                 endif
  267.             endcase
  268.             case 11
  269.                 ;User selected "Mail Door"
  270.                 if FLAGS & DEFAULTS
  271.                     defaultsdoor()
  272.                 else
  273.                     cfgmaildoor()
  274.                 endif
  275.             endcase
  276.             case 12
  277.                 ;User selected "Export"
  278.                 exportprompts()
  279.             endcase
  280.             case 13
  281.                 ;User selected "Save"
  282.                 if FLAGS & DEFAULTS
  283.                     writeprompts(MailRunIni, BBSType)
  284.                 else
  285.                     writeprompts(MailRun, BBSChoice)
  286.                     profilewr MailRun BBSChoice "BBSType" BBSType
  287.                 endif
  288.                 FLAGS &= UNCHANGED
  289.             endcase
  290.             case 14
  291.                 ;User selected "Done"
  292.                 if checkchanged()
  293.                     exit
  294.                 endif
  295.             endcase
  296.             case 170
  297.                 ;User changed BBS with the combobox
  298.                 if checkchanged()
  299.                     loadprompts(MailRun, BBSChoice)
  300.                     profilerd MailRun BBSChoice "BBSType" BBSType
  301.                     TaskItem = gettaskstring(BBSChoice, 0)
  302.                     LastBBS = BBSChoice
  303.                     updatedlg -1
  304.                 else
  305.                     BBSChoice = LastBBS
  306.                     updatedlg 512
  307.                 endif
  308.             endcase
  309.             case 171
  310.                 ;User changed BBS type
  311.                 if FLAGS & DEFAULTS
  312.                     if checkchanged()
  313.                         loadprompts(MailRunIni, BBSType)
  314.                         updatedlg 128
  315.                         FLAGS &= UNCHANGED
  316.                         LastBBSType = BBSType
  317.                     else
  318.                         BBSType = LastBBSType
  319.                         updatedlg 512
  320.                     endif
  321.                 else
  322.                     loadprompts(MailRunIni, BBSType)
  323.                     updatedlg 128
  324.                     FLAGS |= CHANGED
  325.                 endif
  326.             endcase
  327.             case 230
  328.             case 231
  329.             case 232
  330.             case 233
  331.             case 234
  332.             case 235
  333.             case 236
  334.             case 237
  335.             case 238
  336.             case 239
  337.             case 240
  338.             case 241
  339.             case 242
  340.             case 243
  341.             case 244
  342.             case 245
  343.                 FLAGS |= CHANGED
  344.             endcase
  345.         endswitch
  346.     endwhile
  347. endproc
  348.  
  349.  
  350. #comment
  351. *********************************************************************
  352. * CHANGEMAILDOOR()
  353. * Called by main()
  354. * Calls makebbslist(), interfaceon(),
  355. * loadmaildoor(), writemaildoor(),
  356. * maildoorbox(), defaultsbbs(), defaultsprompts(),
  357. * cfgbbs(), cfgprompts(), exportmaildoor(), checkchanged(),
  358. * gettaskstring()
  359. * Allows the user to change the mail door prompts for a
  360. * given BBS in the *.MRN file.
  361. *********************************************************************
  362. #endcomment
  363.  
  364. proc changemaildoor
  365. string LastBBS, LastDoorType
  366. integer dialogstatus
  367.     if FLAGS & DEFAULTS
  368.         BBSList = "DEFAULT"
  369.         BBSChoice = "DEFAULT"
  370.         profilerd MailRun "DEFAULT" "MailDoorType" MailDoorType
  371.         loadmaildoor(MailRunIni, MailDoorType)
  372.     else
  373.         makebbslist()
  374.         strextract BBSChoice TaskItem "`t" 3
  375.         profilerd MailRun BBSChoice "MailDoorType" MailDoorType
  376.         loadmaildoor(MailRun, BBSChoice)
  377.     endif
  378.         profilerd MailRun BBSChoice "QWKArchiver" QWKArchiver
  379.         profilerd MailRun BBSChoice "MailXferProt" MailXferProt
  380.     LastBBS = BBSChoice
  381.     LastDoorType = MailDoorType
  382.     ArcList = "arj.exe,fpzipx.exe,lha.exe,lharc.exe,pkunzip.exe,pkxarc.exe,zoo.exe"
  383.     maildoorbox()
  384.     interfaceon()
  385.     while 1
  386.         dialogstatus = $DIALOG
  387.         switch dialogstatus
  388.             case 10
  389.                 ;User selected "Prompts"
  390.                 if FLAGS & DEFAULTS
  391.                     defaultsprompts()
  392.                 else
  393.                     cfgprompts()
  394.                 endif
  395.             endcase
  396.             case 11
  397.                 ;User selected "BBS Info"
  398.                 if FLAGS & DEFAULTS
  399.                     defaultsbbs()
  400.                 else
  401.                     cfgbbs()
  402.                 endif
  403.             endcase
  404.             case 12
  405.                 ;User selected "Export"
  406.                 exportmaildoor()
  407.             endcase
  408.             case 13
  409.                 ;User selected "Save"
  410.                 if FLAGS & DEFAULTS
  411.                     writemaildoor(MailRunIni, MailDoorType)
  412.                 else
  413.                     writemaildoor(MailRun, BBSChoice)
  414.                     profilewr MailRun BBSChoice "MailDoorType" MailDoorType
  415.                 endif
  416.                 profilewr MailRun BBSChoice "QWKArchiver" QWKArchiver
  417.                 profilewr MailRun BBSChoice "MailXferProt" MailXferProt
  418.                 FLAGS &= UNCHANGED
  419.             endcase
  420.             case 14
  421.                 ;User selected "Done"
  422.                 if checkchanged()
  423.                     exit
  424.                 endif
  425.             endcase
  426.             case 170
  427.                 ;User changed mail door type
  428.                 if FLAGS & DEFAULTS
  429.                     if checkchanged()
  430.                         loadmaildoor(MailRunIni, MailDoorType)
  431.                         FLAGS &= UNCHANGED
  432.                         updatedlg 128
  433.                         LastDoorType = MailDoorType
  434.                     else
  435.                         MailDoorType = LastDoorType
  436.                         updatedlg 512
  437.                     endif
  438.                 else
  439.                     loadmaildoor(MailRunIni, MailDoorType)
  440.                     FLAGS |= CHANGED
  441.                     updatedlg 128
  442.                 endif
  443.             endcase
  444.             case 173
  445.                 ;User changed the current BBS
  446.                 if checkchanged()
  447.                     loadmaildoor(MailRun, BBSChoice)
  448.                     profilerd MailRun BBSChoice "MailDoorType" MailDoorType
  449.                     profilerd MailRun BBSChoice "QWKArchiver" QWKArchiver
  450.                     profilerd MailRun BBSChoice "MailXferProt" MailXferProt
  451.                     TaskItem = gettaskstring(BBSChoice, 0)
  452.                     LastBBS = BBSChoice
  453.                     updatedlg -1
  454.                 else
  455.                     BBSChoice = LastBBS
  456.                     updatedlg 512
  457.                 endif
  458.             endcase
  459.             case 171
  460.             case 172
  461.             case 230
  462.             case 231
  463.             case 232
  464.             case 233
  465.             case 234
  466.             case 235
  467.                 FLAGS |= CHANGED
  468.             endcase
  469.         endswitch
  470.     endwhile
  471. endproc
  472.                 
  473.  
  474. #comment
  475. *********************************************************************
  476. * ADDBBS()
  477. * Called by changeuserinfo()
  478. * Calls fverify(), inlist(), loadbbsinfo(), loadprompts(), 
  479. * loadmaildoor()
  480. * Adds a BBS to the *.MRN file, assigning default info
  481. * and prompts.
  482. *********************************************************************
  483. #endcomment
  484.  
  485. proc addbbs
  486. string NewBBS
  487.     while 1
  488.         sdlginput "BBS ID" "Enter the ID of the BBS:" NewBBS
  489.         if FAILURE
  490.             exit 
  491.         endif
  492.         strlwr NewBBS
  493.         if not fverify(NewBBS)
  494.             usermsg "A bulletin board's BBS ID is the same as the \
  495. name of it's QWK packet.  It must be a valid DOS \
  496. file name without the extension."
  497.         elseif inlist(NewBBS, BBSList) 
  498.             errormsg "That BBS is already in the MailRun!"
  499.         else
  500.             exitwhile
  501.         endif
  502.     endwhile
  503.  
  504.     ;If there is no previously existing information for the new BBS,
  505.     ;assign the defaults, otherwise, use the old info.
  506.     ;Any previously entered BBS will have a name.
  507.  
  508.     profilerd MailRun NewBBS "BBSName" BBSName
  509.     if NULLSTR BBSName
  510.         ;Load defaults
  511.         loadbbsinfo(MailRun, "DEFAULT")
  512.         loadprompts(MailRunIni, BBSType)
  513.         loadmaildoor(MailRunIni, MailDoorType)
  514.         BBSName = ""
  515.         FLAGS &= (ALLFLAGS - DEFAULTS)
  516.     else
  517.         loadbbsinfo(MailRun, NewBBS)
  518.         loadprompts(MailRun, NewBBS)
  519.         loadmaildoor(MailRun, NewBBS)
  520.     endif
  521.     FLAGS |= CHANGED
  522.     ;Add the new BBS to the BBS list
  523.     if not NULLSTR BBSList
  524.         strfmt BBSList "%s,%s" BBSList NewBBS
  525.     else
  526.         BBSList = NewBBS
  527.     endif
  528.     BBSChoice = NewBBS
  529.     updatedlg -1
  530. endproc
  531.  
  532.  
  533. #comment
  534. *********************************************************************
  535. * EXPORTPROMPTS()
  536. * Called by changeprompts()
  537. * Calls findstring(), writeprompts(), makebbstypelist(),
  538. * inlist()
  539. * Creates a new BBS type with current prompt set.
  540. *********************************************************************
  541. #endcomment
  542.  
  543. proc exportprompts
  544. string NewBBSType, BBSType_X
  545. integer i
  546.     while 1
  547.         NewBBSType = BBSType
  548.         sdlginput "Export Prompts" "Name the new prompt set:" \
  549.             NewBBSType DEFAULT
  550.         if FAILURE
  551.             return
  552.         endif
  553.         if inlist(NewBBSType, BBSTypeList) 
  554.             usermsg "There is already a prompt set for %s!" NewBBSType
  555.             loopwhile
  556.         endif
  557.         if !(findstring(NewBBSType "PCBoard") || \
  558.             findstring(NewBBSType, "WildCat") || \
  559.             findstring(NewBBSType, "Auntie") || findstring(NewBBSType, "RBBS"))
  560.             usermsg "The name of the prompt set must contain a \
  561. keyword indicating the type of BBS.  Valid keywords are `"PCBoard,`" \
  562. `"WildCat,`" `"RBBS`" and `"Auntie.`""
  563.             loopwhile
  564.         endif
  565.         exitwhile
  566.     endwhile
  567.     i = 1
  568.     strfmt BBSType_X "BBSType_%d" i
  569.     profilerd MailRunIni "BBSTypes" BBSType_X BBSType
  570.     while not NULLSTR BBSType
  571.         i++
  572.         strfmt BBSType_X "BBSType_%d" i
  573.         profilerd MailRunIni "BBSTypes" BBSType_X BBSType
  574.     endwhile
  575.     BBSType = NewBBSType
  576.     profilewr MailRunIni "BBSTypes" BBSType_X BBSType
  577.     writeprompts(MailRunIni, BBSType)
  578.     makebbstypelist()
  579.     updatedlg 512
  580. endproc
  581.  
  582.  
  583. #comment
  584. *********************************************************************
  585. * EXPORTMAILDOOR()
  586. * Called by changemaildoor()
  587. * Calls writemaildoor(), makemaildoorlist(), inlist()
  588. * Adds a BBS to the *.MRN file, assigning default info
  589. * and prompts.
  590. *********************************************************************
  591. #endcomment
  592.  
  593. proc exportmaildoor
  594. string NewMailDoorType, MailDoor_X
  595. integer i
  596.     while 1
  597.         NewMailDoorType = MailDoorType
  598.         sdlginput "Export Prompts" "Name the new mail door:" \
  599.             NewMailDoorType DEFAULT
  600.         if FAILURE
  601.             return
  602.         endif
  603.         if inlist(NewMailDoorType, MailDoorList) 
  604.             usermsg "There is already a prompt set for %s!" \
  605.                 NewMailDoorType
  606.             loopwhile
  607.         endif
  608.         exitwhile
  609.     endwhile
  610.     i = 1
  611.     strfmt MailDoor_X "MailDoor_%d" i
  612.     profilerd MailRunIni "MailDoors" MailDoor_X MailDoorType
  613.     while not NULLSTR MailDoorType
  614.         i++
  615.         strfmt MailDoor_X "MailDoor_%d" i
  616.         profilerd MailRunIni "MailDoors" MailDoor_X MailDoorType
  617.     endwhile
  618.     MailDoorType = NewMailDoorType
  619.     profilewr MailRunIni "MailDoors" MailDoor_X MailDoorType
  620.     writemaildoor(MailRunIni, MailDoorType)
  621.     makemaildoorlist()
  622.     updatedlg 512
  623. endproc
  624.  
  625.  
  626. #comment
  627. *********************************************************************
  628. * BBSBOX()
  629. * Called by changeuserinfo()
  630. * Displays the BBS Information dialog box.
  631. *********************************************************************
  632. #endcomment
  633.  
  634. proc bbsbox
  635. destroydlg
  636. HelpPage = 5
  637. dialogbox 24 36 320 215 15 "BBS Information" helpid HelpPage
  638.    text  142 10 40 8 right "BBS Name:"
  639.    editbox 186 8 121 12 BBSName
  640.    groupbox 10 28 138 156 "BBS Info" shadow
  641.    text  13 47 62 8 right "User ID:"
  642.    text  13 67 62 8 right "Password:"
  643.    text  13 87 62 8 right "Xfer Protocol:"
  644.    text  13 107 62 11 right "Calling From:"
  645.    text  13 127 62 8 right "User Response 1:"
  646.    text  13 147 62 8 right "User Response 2:"
  647.    text  27 167 92 8 right "Language/Prompt Scheme:"
  648.    editbox 79 45 60 12 UserName
  649.    editbox 79 65 60 12 PWord
  650.    combobox 79 85 60 42 ProtList XferProt sort
  651.    editbox 79 105 60 12 CallingFrom
  652.    editbox 79 125 60 12 UserResp1
  653.    editbox 79 145 60 12 UserResp2
  654.    editbox 123 165 16 12 LangNumber
  655.    checkbox 187 174 90 12 "Display ANSI Graphics " GraphicsOn
  656.    groupbox 158 29 150 79 "Phone Numbers" shadow
  657.    text  162 49 35 8 right "Node 1:"
  658.    text  162 69 35 8 right "Node 2:"
  659.    text  162 89 35 8 right "Node 3:"
  660.    editbox 201 47 100 12 Number_1
  661.    editbox 201 67 100 12 Number_2
  662.    editbox 201 87 100 12 Number_3
  663.    groupbox 158 115 150 50 shadow
  664.    text  160 128 39 8 right "BBS Type:"
  665.    text  171 145 39 8 right "Mail Door:"
  666.    combobox 202 124 98 42 BBSTypeList BBSType sort
  667.    combobox 214 143 76 42 MailDoorList MailDoorType sort
  668.    pushbutton 42 193 52 14 "&Prompts" normal
  669.    pushbutton 104 193 52 14 "&Mail Door" normal
  670.    pushbutton 169 193 52 14 "&Save" normal default
  671.    pushbutton 232 193 52 14 "&Done" normal
  672.    text  28 10 36 8 right "BBS ID:"
  673.    combobox 68 8 66 42 BBSList BBSChoice sort
  674. enddialog
  675. endproc
  676.  
  677.  
  678. #comment
  679. *********************************************************************
  680. * PROMPTBOX()
  681. * Called by changeprompts()
  682. * Displays the BBS Prompts dialog box.
  683. *********************************************************************
  684. #endcomment
  685.  
  686. proc promptbox
  687. destroydlg
  688. HelpPage = 6
  689. dialogbox 14 36 324 209 15 "BBS Prompts" HELPID HelpPage
  690.    groupbox 13 30 297 147 shadow
  691.    text  18 44 56 8 right "Language:"
  692.    text  18 60 56 8 right "ANSI Graphics:"
  693.    text  18 76 56 8 right "Name:"
  694.    text  18 92 56 8 right "Password:"
  695.    text  18 108 56 8 right "User Prompt 1:"
  696.    text  18 124 56 8 right "User Prompt 2:"
  697.    text  18 140 56 8 right "View:"
  698.    text  18 156 56 8 right "Scan Msg Base:"
  699.    editbox 78 42 76 12 LangPrompt
  700.    editbox 78 58 76 12 GraphicsPrompt
  701.    editbox 78 74 76 12 NamePrompt
  702.    editbox 78 90 76 12 PWordPrompt
  703.    editbox 78 106 76 12 UserPrompt1
  704.    editbox 78 122 76 12 UserPrompt2
  705.    editbox 78 138 76 12 ViewPrompt
  706.    editbox 78 154 76 12 ScanPrompt
  707.    text  160 44 56 8 right "File Prompt:"
  708.    text  160 60 56 8 right "More:"
  709.    text  160 76 56 8 right "Continue:"
  710.    text  160 92 56 8 right "Command:"
  711.    text  160 108 56 8 right "File Unavailable:"
  712.    text  160 124 56 8 right "File Description:"
  713.    text  160 140 56 8 right "Start File D/L:"
  714.    text  160 156 56 8 right "Start File U/L:"
  715.    editbox 220 42 76 12 FilePrompt
  716.    editbox 220 58 76 12 MorePrompt
  717.    editbox 220 74 76 12 ContinuePrompt
  718.    editbox 220 90 76 12 CommandPrompt
  719.    editbox 220 106 76 12 DLUnavPrompt
  720.    editbox 220 122 76 12 ULDescPrompt
  721.    editbox 220 138 76 12 DLPrompt
  722.    editbox 220 154 76 12 ULPrompt
  723.    pushbutton 22 187 48 14 "&BBS Info" normal
  724.    pushbutton 80 187 48 14 "&Mail Door" normal
  725.    pushbutton 138 187 48 14 "&Export" normal
  726.    pushbutton 196 187 48 14 "&Save" normal default
  727.    pushbutton 254 187 48 14 "&Done" normal
  728.    text  12 14 42 8 right "Prompts for:"
  729.    combobox 58 12 72 42 BBSList BBSChoice sort
  730.    text  134 14 68 8 right "Prompts based on:"
  731.    combobox 206 12 100 42 BBSTypeList BBSType sort
  732. enddialog
  733. endproc
  734.  
  735.  
  736. #comment
  737. *********************************************************************
  738. * MAILDOORBOX()
  739. * Called by changemaildoor()
  740. * Displays the Mail Door dialog box.
  741. *********************************************************************
  742. #endcomment
  743.  
  744. proc maildoorbox
  745. destroydlg
  746. HelpPage = 7
  747. dialogbox 8 36 342 165 15 "Mail Door" helpid HelpPage
  748.    groupbox 12 33 156 93 shadow
  749.    text  20 48 62 8 right "Start Mail Door:"
  750.    text  20 68 62 8 right "Prompts Based on:"
  751.    text  20 88 62 8 right "QWK Archiver:"
  752.    text  20 108 62 8 right "Transfer Protocol:"
  753.    editbox 86 46 70 12 MailDoor
  754.    combobox 86 66 70 42 MailDoorList MailDoorType sort
  755.    combobox 86 86 70 42 ArcList QWKArchiver sort
  756.    combobox 86 106 70 42 ProtList MailXferProt sort
  757.    groupbox 180 11 150 115 "Prompts" shadow
  758.    text  190 28 56 8 right "Message Menu:"
  759.    text  190 48 56 8 right "Mail Command:"
  760.    text  190 68 56 8 right "Receive Packet:"
  761.    text  190 88 56 8 right "Start Mail U/L:"
  762.    text  190 108 56 8 right "Start Mail D/L:"
  763.    editbox 250 25 70 12 MsgMenuPrompt
  764.    editbox 250 46 70 12 MailPrompt
  765.    editbox 250 66 70 12 ReceiveQWKPrompt
  766.    editbox 250 86 70 12 MailULPrompt
  767.    editbox 250 106 70 12 MailDLPrompt
  768.    text  19 13 53 8 right "Mail Door for:"
  769.    combobox 76 11 77 42 BBSList BBSChoice sort
  770.    pushbutton 22 139 50 14 "&Prompts" normal
  771.    pushbutton 84 139 50 14 "&BBS Info" normal
  772.    pushbutton 146 139 50 14 "&Export" normal
  773.    pushbutton 208 139 50 14 "&Save" normal default
  774.    pushbutton 270 139 50 14 "&Done" normal
  775. enddialog
  776. endproc
  777.  
  778.  
  779. #comment
  780. *********************************************************************
  781. * MAKEPROTLIST()
  782. * Called by main()
  783. * Creates a list of transfer protocols for display in the
  784. * bbsbox() dialog box protocol combobox.
  785. *********************************************************************
  786. #endcomment
  787.  
  788. proc makeprotlist
  789. string ProtName
  790. integer i
  791.     i = 0
  792.     ProtList = ""
  793.     getitem PROTOCOL i ProtName
  794.     while not NULLSTR ProtName
  795.         strfmt ProtList "%s,%s" ProtList ProtName
  796.         i++
  797.         getitem PROTOCOL i ProtName
  798.     endwhile
  799.     strdelete ProtList 0 1
  800. endproc
  801.  
  802.  
  803. #comment
  804. *********************************************************************
  805. * MAKEMAILDOORLIST()
  806. * Called by main(), exportmaildoor()
  807. * Creates a list of mail doors for display the mail door
  808. * combobox of the BBS info and Mail Door dialog boxes.
  809. *********************************************************************
  810. #endcomment
  811.  
  812. proc makemaildoorlist
  813. string MailDoor_X, DoorType
  814. integer i
  815.     MailDoorList = ""
  816.     i = 1
  817.     profilerd MailRunIni "MailDoors" "MailDoor_1" DoorType
  818.     while not NULLSTR DoorType
  819.         strfmt MailDoorList "%s,%s" MailDoorList DoorType
  820.         i++
  821.         strfmt MailDoor_X "MailDoor_%d" i
  822.         profilerd MailRunIni "MailDoors" MailDoor_X DoorType
  823.     endwhile
  824.     if i > 1
  825.         strdelete MailDoorList 0 1
  826.     endif
  827. endproc
  828.  
  829.  
  830. #comment
  831. *********************************************************************
  832. * MAKEBBSTYPELIST()
  833. * Called by main(), exportprompts()
  834. * Creates a list of BBS types for display the BBS type
  835. * combobox of the BBS info and BBS prompt dialog boxes.
  836. *********************************************************************
  837. #endcomment
  838.  
  839. proc makebbstypelist
  840. string BBSType_X, BoardType
  841. integer i
  842.     BBSTypeList = ""
  843.     i = 1
  844.     profilerd MailRunIni "BBSTypes" "BBSType_1" BoardType
  845.     while not NULLSTR BoardType
  846.         strfmt BBSTypeList "%s,%s" BBSTypeList BoardType
  847.         i++
  848.         strfmt BBSType_X "BBSType_%d" i
  849.         profilerd MailRunIni "BBSTypes" BBSType_X BoardType
  850.     endwhile
  851.     if i > 1
  852.         strdelete BBSTypeList 0 1
  853.     endif
  854. endproc
  855.